#node js mongoose express
Explore tagged Tumblr posts
codeonedigest · 2 years ago
Text
youtube
0 notes
web-search-development · 2 years ago
Text
Mongoose npm for nodejs 2023
Mongoose is a widely-used Node.js library that provides a straightforward and elegant way to interact with MongoDB, a popular open-source NoSQL database. Developed to simplify database management and streamline interactions between applications and MongoDB, Mongoose offers an object modeling system that enables developers to define schemas, validate data, and perform CRUD (Create, Read, Update, Delete) operations with ease. Read More..
1 note · View note
sruthypm · 2 months ago
Text
From Beginner to Pro: Join the Top Full-Stack JavaScript Course in Kochi at Techmindz
Have you ever dreamt of building your own web application from scratch? Whether it's an interactive website or a scalable web app, JavaScript makes it all possible. At Techmindz, our Full-Stack JavaScript Course in Kochi is designed to help you master the full development cycle — using just one powerful language: JavaScript.
🌟 Why Learn Full-Stack JavaScript?
JavaScript has transformed from a simple scripting language into a full ecosystem for web development. From dynamic front-end user experiences to fast, scalable back-end services — it's all doable with JavaScript.
With popular frameworks like React, Node.js, and Express, full-stack JavaScript development is the go-to choice for modern developers. It’s efficient, high-performing, and, most importantly, in massive demand by tech companies.
🏫 Why Techmindz is Your Best Bet
Located in Infopark, Kochi, Techmindz offers one of the most comprehensive and career-focused Full-Stack JavaScript programs in Kerala. Our goal is simple: to take you from beginner to job-ready full-stack developer.
🔍 What You’ll Learn:
Front-End: HTML, CSS, JavaScript ES6+, React.js
Back-End: Node.js, Express.js
Database: MongoDB with Mongoose
APIs: RESTful Web Services
Dev Tools: Git, GitHub, Postman
Deployment: Hosting your projects on the web
All these modules come with real-time projects that you can showcase in your resume and GitHub profile.
💡 Why Students Love Us
🧑‍🏫 Mentorship from industry experts
💼 Placement-oriented training with soft skills and interview practice
🔄 Live projects to build your coding confidence
🖥️ Flexible learning options – online/offline/hybrid
🎓 Certification + Portfolio Development
👥 Is This Course for You?
Absolutely! Whether you’re:
A college student looking to stand out
A job seeker wanting to enter the tech industry
A developer wanting to upgrade your skills
A career-switcher exploring new opportunities
This course will give you the technical edge and confidence to succeed.
🚀 Let’s Code Your Future Together
In the thriving tech scene of Kochi, full-stack JavaScript skills can open doors to top startups, product companies, and MNCs. Don’t miss your chance to enroll in the most dynamic Full-Stack JavaScript Course in Kochi.
0 notes
fullstackseekho · 8 months ago
Text
Node JS and Databases
Steps to Build a Blog Application
1. Project Setup
First, you create a new Node.js project on your computer.
You also install necessary tools like Express (for creating a web server) and Mongoose or MySQL (for interacting with the database).
Nodemon can be used during development to restart the server automatically when code changes.
2. Folder Structure
Organize your project files so that everything is easy to manage.
Models: This folder will store database schemas (like the blog post structure).
Routes: These handle requests to different parts of your blog (e.g., showing all posts or creating new ones).
Views: These are the templates used to render your pages (like home, post details).
Public: A place for static files (CSS stylesheets, images).
3. Setting Up the Database
You can use either MongoDB (a NoSQL database) or MySQL (a relational database) to store your blog posts.
MongoDB is easier for beginners because you don't need to define strict tables.
You create a "Blog" model, which defines the structure of each blog post (e.g., it should have a title, content, and a timestamp).
The database connection is established at the beginning so the app can interact with it throughout.
4. Handling HTTP Requests with Express
The Express framework helps manage the flow of the app:
When a user visits the home page, the server sends a list of all blog posts.
When they click on a specific post, it shows the details of that post.
There is also a form where users can create new posts by submitting titles and content.
You create routes to manage these requests. Each route corresponds to a specific URL (e.g., / for the home page, /post/:id to view a post).
5. Creating Views (Templates)
To make your pages dynamic, you use EJS (or another templating engine like Handlebars). Templates allow you to display different content based on the data from the database.
For example:
The home page lists all available blog posts with links to view them individually.
The post page shows the title, content, and date of a single post.
There can also be a form on the home page that lets users submit new posts.
6. Routing and User Interaction
When users visit the homepage, the server pulls data from the database and shows a list of posts.
Clicking on a post’s link takes them to a detailed view of that post.
Users can also add a new post by submitting a form. When they do, the app saves the new post in the database and refreshes the list.
7. Starting the App
You need to make sure both the database server and Node.js app are running.
MongoDB needs to be started separately (if using it).
The Node.js server listens for requests and responds based on the routes you’ve created.
The server is accessible via http://localhost:3000. You can open this in a browser to test the blog app.
8. Testing the Blog API (Optional)
To make sure everything works correctly, you can use tools like Postman to test your routes:
Test retrieving all posts by making a GET request.
Test creating a new post by sending a POST request with sample data.
You can also build error handling to manage invalid inputs.
9. Future Improvements
After setting up the basic blog, you can add advanced features:
User Authentication: Allow users to log in and manage their own posts.
Comments: Add a comment section for each post.
Pagination: Break long lists of posts into pages for better readability.
CSS Styling: Make the blog look more attractive with a custom stylesheet.
Summary
This blog app involves setting up a Node.js server, connecting it to a database to store posts, and using templates to render pages. When users visit the blog, they can view, create, or manage posts, all of which are stored in the database. Express routes manage the requests, and the views ensure everything is displayed neatly.
This project gives you hands-on experience with backend development using Node.js, along with frontend templates, and a solid understanding of working with databases.
Fullstack Seekho is launching a new full stack training in Pune 100% job Guarantee Course. Below are the list of Full Stack Developer Course in Pune:
1. Full Stack Web Development Course in Pune and MERN Stack Course in Pune
2. Full Stack Python Developer Course in Pune
3. full stack Java course in Pune And Java full stack developer course with placement
4. Full Stack Developer Course with Placement Guarantee
Visit the website and fill the form and our counsellors will connect you!
0 notes
salehahmedmahin · 2 years ago
Text
Tumblr media
আজকে কথা বলতে যাচ্ছি জাভাস্ক্রিপ্টে কীভাবে স্কিলড হওয়া যায় এবং কীভাবে শুরু করতে পারি? বা একজন জাভাস্ক্রিপ্ট ডেভেলপারের কী কী জানা প্রয়োজন হতে পারে?
প্রথমে জেনে নেয়া যাক কাভাস্ক্রিপ্ট কি?
জাভাস্ক্রিপ্ট হলো একটি লাইট ওয়েট, ইন্টারপ্রিটেড অথবা জাস্ট-ইন-টাইম কম্পাইল্ড প্রোগ্রামিং ল্যাঙ্গুয়েজ। এটা স্ক্রিপ্টিং ল্যাঙ্গুয়েজ হিসেবেও পরিচিত। ব্রাউজারের মাতৃভাষা বলা যেতে পারে এই জাভাস্ক্রিপ্ট কে। আরেকভাবে বলতে গেলে বলা যায়, HTML যদি ওয়েবসাইটের হাড্ডি-গুড্ডি হয় আর CSS যদি ওয়েবসাইটের সাঁজ-সজ্জার সরঞ্জাম হয় তাহলে ওয়েবসাইটের ব্রেইন বলা হবে জাভাস্ক্রিপ্ট কে।
এবার আসি কীভাবে শুরু করতে পারি?
⦿ Understand the basic:
সর্বপ্রথম যে স্টেপ সেটি হলো জাভাস্ক্রিপ্ট এর বেসিক এবং ফান্ডামেন্টালস সম্পর্কে জানা, যেমনঃ ভে��িয়েবল, ডাটা টাইপ, অপারেটর, লুপ, ফাংশন, অ্যারে অবজেক্ট ইত্যাদি। এসব বিষয়গুলোর উপড়ে স্পষ্ট ধারনা থাকা আবশ্যক। বেসিক স্ট্রং না থাকলে খুব একটা সুবিধা করে উঠা সম্ভব না।
⦿ Dive deeper into JavaScript:
বেসিক শেষ করার পড় এবার গভীরে ঢোকার পালা। এই স্টেপ এ জাভাস্ক্রিপ্ট-এর অ্যাডভান্স কিছু বিষয় নিয়ে ঘাটাঘাটি করার সময়। এর মধ্যে আছে clouser, scope, hoisting, prototype-based inheritance। আরও কিছু বিষয় এই স্টেপ এ শিখা উচিত। এগুলোর মধ্যে callbacks, promises, async/await অন্যতম। এছাড়াও ইরোর হ্যান্ডেলিং এবং ডিবাগিং টেকনিক গুলো তো শিখতেই হবে।
⦿ Practice with Hands-on Exercise:
এসকল টপিক ক্লিয়ার করে নিয়ে এবার প্রবলেম সল্ভিং এ প্রবেশ করতে হবে। বিভিন্ন কোডিং চ্যালেঞ্জ এবং এক্সারসাইজ তোমাকে একজন জাভাস্ক্রিপ্ট এর কনসেপ্টগুলোকে পাকাপোক্ত ভাবে বুঝতে সহায়তা করবে।এছাড়াও বিভিন্ন অনলাইন প্ল্যাটফর্ম যেমন FreeCodeCamp বিভিন্ন প্র্যাকটিস প্রবলেম এবং প্রজেক্ট অফার করে। এসকল প্র্যাকটিস প্রবেল্যাম্ব আর প্রজেক্টগুলো করা জ্যাতে পারে। এতে করে জাভাস্ক্রিপ্ট এর ভিত মজবুত হবে।
⦿ Build Projects:
এবার প্রজেক্ট করার পালা। এতদিন এ যা যা শিখেছো সেসব কে কাজে লাগিয়ে বানিয়ে ফেলো ছোট ছোট প্রজেক্ট। এটা হতে পারে ফর্ম ভ্যালিডেশন বা ক্যালকুলেটর। আবার হতে পারে To-Do List অ্যাপ্লিকেশন। তোমার প্রগ্রেস অনুযায়ী আরও কমপ্লেক্স প্রজেক্ট করার চেষ্টা করা উচিত। যে প্রজেক্ট এ API থাকতে পারে, বা হতে পারে ডাটাবেস এর সাথে ইন্টিগ্রেশন। আবার হতে পারে একটি ইন্টার‍্যাক্টিভ ওয়েব অ্যাপ্লিকেশন। প্রজেক্ট না করলে এসবের আসল প্রয়োগ শেখা সম্ভব না। তাই বেশী বেশী প্রজেক্ট করা উচিত।
⦿ Learn DOM Manipulation:
এবার DOM অর্থাৎ Document Object Model নিয়ে খেলা দেখানোর সময়। এই স্টেপ এ JavaScript কীভাবে HTML, CSS এর সাথে ইন্টার‍্যাক্ট করে DOM কী? এটা কীভাবে কাজ করে এই বিষয়গুলো বুঝতে হবে, জানতে হবে। কীভাবে HTML, CSS আর JavaScript মিলে একটা ইন্টার‌্যাক্টিভ ওয়েব অ্যাপ্লিকেশন তৈরি হয় এই বিষয়গুলো বুঝতে হবে। কীভাবে HTML এলিমেন্ট গুলোকে ম্যানিপুলেট করতে হয়, কীভাবে স্টাইল চেইঞ্জ করতে হয়, কীভাবে ইভেন্টস গুলোকে হ্যান্ডেল করতে হয় এই বিষয়গুলো জানতে হবে এবং সব মিলে একটা ইন্টার‍্যাক্টিভ ওয়েবসাইট বানিয়ে ফেলতে হবে।
⦿ Study JavaScript Libraries and Frameworks:
বিভিন্ন জনপ্রিয় জাভাস্কিপ্ট লাইব্রেরিগুলোকে এক্সপ্লোর করতে হবে। এরমধ্যে রয়েছে React, Angular, Veu ইত্যাদি। এগুলোর কোর কনসেপ্ট গুলো বুঝতে হবে। এগুলো ব্যবহার করে কীভাবে আর শক্তিশালী ওয়েব অ্যাপ্লিকেশন বানানো যায় সেই সম্পর্কে জানতে হবে।
⦿ Learn Backend Development with Node Js:
Node Js সম্পর্কে কোর কনসেপ্টগুলো জানতে হবে। এটি একটি জাভাস্ক্রিপ্ট রানটাইম এনভায়রনমেন্ট যা সার্ভার সাইড ডেভেলপমেন্ট এ সহায়তা করে। এরপর Node Js এর পপুলার ফ্রেমওয়ার্ক Express Js দিয়ে কীভাবে ওয়েব সার্ভার, API সমূহ তৈরি করা যায় সেই সব বিষয় শিখতে হবে। ওয়েব সার্ভার শিখতে গেলে ডাটাবেস সম্পর্কে ধারনা থাকা আবশ্যক। এগুলোকে কীভাবে ব্যাকেন্ড এর সাথে ইন্টার‍্যাক্ট করতে হয় সেই সম্পর্কে জানতে হবে। এর জন্য কিছু লাইব্রেরিও রয়েছে যেমন Mongoose, Sequelize ইত্যাদি। এগুলো সম্পর্কে ধারনা রাখতে হবে।
⦿ Keep learning and stay updated:
জাভাস্ক্রিপ্ট এ প্রায়ই নিত্যনতুন আপডেট এর দেখা পাওয়া যায়। তাই সময়ের সাথে নিজেকে আপডেট রাখা খুব জরুরি। নতুন নতুন ফিচার গুলো ফাংশনালিটি গুলো যতদ্রুত আয়ত্ব করে ফেলা সম্ভব ততোই ভালো। এর জন্য ডিকুমেন্টেশন, ইউটিউব টিউটোরিয়াল, ব্লগ ইত্যাদির সাহায্য নেয়া যেতে পারে। জাভাস্ক্রিপ্ট এর বিভিন্ন কমিউনিটি-এর সাথে যুক্ত হওয়া যেতে পারে যেখান থেকে প্রতিনিয়ত আপডেটেড বিষয়গুলো সম্পর্কে জানা সম্ভব।
⦿ Collaborate and Contribute:
ডেভেলপার কমিউনিটি-এর সঙ্গে যুক্ত হয়ে বিভিন্ন ওপেন-সোর্স প্রজেক্ট-এ অংশগ্রহণ করা, বিভিন্ন ডেভেলপারদের সাথে কোলাবরেট করা, বিভিন্ন প্ল্যাটফর্ম এ কন্ট্রিবিউট করা যেমন, GitHub। গিটহাব তোমাকে প্র্যাক্টিক্যাল অভিজ্ঞতা এবং কোডিং স্কিল কে বৃদ্ধি করতে অনেকটাই সাহায্য করবে।
⦿ Build a Portfolio:
শেখার পালা তো শেষ। এবার নিজের স্বপ্নকে ছোঁয়ার সময়। এর জন্য প্রয়োজন হবে একটি স্ট্রং পোর্টফলিও, যেখানে তোমার করা প্রজেক্ট এবং স্কিলসগুলোকে প্রদর্শন করা যায়। সেখানে তোমার গিটহাব পোফাইল / রিপোজিটরি, ডিপ্লয় করা প্রজেক্টসমূহ এবং প্রজেক্টগুলোর বিষদ বর্ণনা থাকতে পারে। তোমার একটি স্ট্রং পোর্টফোলিও তোমার স্বপ্নকে ছুতে অনেক সাহায্য করবে।
সবশেষে, এটাই মনে রাখবে প্র্যাকটিস, প্র্যাকটিস, প্র্যাকটিস। প্র্যাকটিসের বিকল্প কিছুই নেই। প্রতিনিয়ত বিভিন্ন প্রজেক্ট, প্রবলেম সল্ভিং ইত্যাদির মাধ্যমে তোমার প্র্যাকটিস করে যেতে হবে।
Learning JavaScript is an ongoing process, so stay committed, be patient, and enjoy the journey!
#javascript #programming #javascriptdeveloper #webdevelopment #coding
0 notes
codingstatusdotcom · 5 years ago
Link
1 note · View note
scholarhat · 2 years ago
Text
The Node.js Development course is primarily intended for UI Developers and Web Developers who want to learn how to create networking and web apps that are fast, event-driven, real-time, scalable, and scalable. You will learn the fundamentals of Node.js, MongoDB, Node ORM - Sequelize, Mongoose, Express, JavaScript Task runner (Gulp), database, express routes, bootstrap process, directives, statements, routes, pipes, services, HTTP web server, view engines - Pug/Handlebars, handle requests & responses, handle requests & responses, event-driven communications, handling databases, and much more in this course.
0 notes
shailendra01 · 2 years ago
Text
https://www.worldranklist.com/preview/bookmarking/496547/Learn-node-js-certification-Scholarhat
The Node.js Development course is primarily intended for UI Developers and Web Developers who want to learn how to create high-performance, event-driven, scalable, real-time networking applications. You will learn the fundamentals of Node.js, MongoDB, Node ORM - Sequelize, Mongoose, Express, JavaScript Task runner (Gulp) and other technologies in this course, including databases, express routes, bootstrapping processes, directives, statements, routes, pipes, services, HTTP web servers, view engines (Pug/Handlebars), handling requests & responses, event-driven communications, handling databases, and more.
0 notes
javascriptnext · 7 years ago
Photo
Tumblr media
MongoDB Tutorial with Node.js, Express & Mongoose ☞ https://codequs.com/p/SyQUk4Jtm/mongodb-tutorial-with-node-js-express-mongoose #nodejs #Express
1 note · View note
programmersajeeb · 3 years ago
Text
Back End
CRUD Operations: CRUD means create, read, update and delete. Using CRUD we can create data in the database if we want, read the data in the database, update the data and delete the data if we want. CRUD is very important for full-stack projects. If we can create a storefront, blog posting page, todo list or social media clone, without CRUD then we will get stuck very quickly.
JWT: JWT, or JSON Web Token, is an open value used to share security information between a client and a server. Each JWT contains an encoded JSON object that contains a claims set. JWT claims are made using a cryptographic algorithm so that claims cannot be changed after the token has been issued.
Mongoose: Mongoose is a node js-based Object Data Modeling library for MongoDB. SQLAlchemy for SQL databases like an Object Relational Mapper. The problem that Mongoose aims to solve is that developers allow the application layer to apply a specific schema.
SQL and NoSQL databases: In SQL the data is in table form. Here every data is stored inside the row. And in NOSQL the data is in object form. Here all the data of a person is shown in object form.
Aggregation: Provides aggregation data records / documents and returns computed results in MongoDB. It collects values ​​from different documents and groups them together. It then performs various operations on the grouped data such as sum, average, minimum, maximum, etc. to return a calculated result.
Express: Express js is a Node js web application server framework, designed to create single-page, multi-page and hybrid web applications.
Nodejs: Node.js is a JavaScript runtime. It is built on Chrome's V8 JavaScript engine. JavaScript is a popular programming language that runs on any web browser, including a good web browser. Node. js is an interpreter with some specific useful libraries for JavaScript that can be used separately in JS programming. Node. js is primarily used for non-blocking, event-driven servers, due to its single-threaded nature.
Entity: Entity can be anything like a place, class or object which has an independent existence in the real world.
Entity Type: Entity Type represents an entity that has the same characteristics.
Entity Set: Entity Set in the database represents a collection of entities having a particular entity type.
Index hunting: Index hunting is the process of increasing the collection of indexes which helps to improve the query performance as well as to make the database faster.
Fragmentation: Fragmentation controls logical data units. It is also known as a fragment which is stored on different sites of a distributed database system.
Data Dictionary: A data dictionary is a set of information that describes the contents and structure of a table and a database object. The function of the information stored in the data dictionary is to control, manipulate and access the relationships between the database elements.
Primary Key: The primary key is the column in the table where each row of data is individually marked. Each row of the table may have a Primary Key but two rows may not have the same Primary Key.
Composite Key: Composite Key is a form of the candidate key where a set of columns will uniquely identify every row in the table.
Unique key: A unique key is a primary key whose data in each row is individually marked with a null value difference, meaning that the unique key approves a value as a zero value.
Database trigger: A set of commands that is automatically executed when an event occurs, such as deleting a row, while inserting, updating, before inserting into a table is called a database trigger.
B-Tree: B-Tree represents a tree-shaped data structure for external memory that can read and write large blocks of data. It is commonly used in databases and file systems where all insertions, deletions, sorting, etc. are done at logarithmic times.
Normalization: Normalization is the process of extracting unnecessary data from a database by splitting the table in a well-defined manner to maintain data integrity.
De-normalization: De-normalization is the process of adding unnecessary data to a table to speed up complex queries and thus achieve better performance.
BCNF: BCNF is the normal Boyce Codd form. This is a higher version of 3Nf where there are no multiple overlapping candidate keys.
DML Compiler: The DML compiler translates the DML statement into a query language in a low-level instruction and the generated instruction is understood by the Query Evaluation Engine.
0 notes
marlinpaul · 4 years ago
Text
NodeJS Tutorial
In this tutorial, we will create a Node-powered blog. On the back end, js is used, on the front end, Bootstrap is used, and the data store is MongoDB. We'll start from scratch and work our way through the project one step at a time. We'll look at how to get all of the packages we'll need into Node to build the blog. Express, Bcrypt, nodemon, express-edge, mongoose, body-parser, express-file upload, and express-session are a few examples. In the index.js file, we'll start with basic routes and gradually transition the application into a Model View Controller architecture. Let's get this party started.
What is Node.js?
Many newcomers to Node are perplexed because they don't understand what it is. The description on nodejs.org is certainly insufficient.
It is critical to understand that Node is not a webserver. It has no effect on its own. It does not function in the same way as Apache. There is no configuration file in which you can point it to your HTML files. You must write an HTTP server if you want it to be an HTTP server (with the help of its built-in libraries). Node.js is simply another programming language that can be run on your computer. It is nothing more than a JavaScript runtime.
When to Use Node?Node is not a magic bullet. It is intended for I/O-intensive operations and excels at developing fast, scalable, and real-time network applications. Online games, collaboration tools, chat systems, and other similar applications are examples of these applications. Node allows you to serve a large number of clients while using minimal system resources, which is why it is designed for high scalability.
Node is also an excellent choice for developing APIs on top of a document database, such as MongoDB. You store your documents in Mongo as JSON objects and expose them via a RESTful API. When reading or writing from your database, there is no need to convert between JSON and other types. In this NodeJS tutorial for beginners, we will create a Node application using this style of architecture
The node should not be used for CPU-intensive operations due to its architecture. Because the goal of this nodejs tutorial is to demonstrate Node in action, I won't go into Node's architecture or why it shouldn't be used for CPU-intensive applications.
Node.js console-based Example
Example:
console.log ('Hello phptpoint');    
you can run the codeby open Node.js command prompt in your system:
Read More...
Visit Here
https://www.phptpoint.com/nodejs-tutorial/
0 notes
codeonedigest · 2 years ago
Text
Nodejs Microservice & MongoDB in Docker Container | Learn Express Mongoose Nodejs Microservices in Docker
Full Video Link https://youtu.be/ltNr8Meob4g Hello friends, new #video on #nodejs #microservices in #docker #container with #mongodb in #docker #container #tutorial for #api #developer #programmers with #examples is published on #codeonedig
In this video we will create Nodejs microservices running in docker container with mongodb running in docker container. We will use Express & mongoose modules in Nodejs to create microservices. I will show how to download MongoDB image from DockerHub repository. How to run mongodb image in docker container. I will explain how to connect nodejs microservices to mongodb running in docker container.…
Tumblr media
View On WordPress
0 notes
Photo
Tumblr media
Advance Node JS Training Institute In Amritsar.
This course was just completely refiled to give you everything you need to master Node.js in 2019! This includes new content, updated versions, new features, and more.
What Is Node JS?
Have you tried to learn Node before? You start a new course, and the instructor has you installing a bunch of libraries before you even know what Node is or how it works. You eventually get stuck and reach out to the instructor, but you get no reply. You then close the course and never open it again. Sound familiar? I created this course to be what I wanted when I was learning Node. The Complete Node.js Developer Course covers the fundamentals of Node before diving deep into great tools like Express, Mongoose, and MongoDB. The entire course is based around a single goal: Turning you into a professional Node developer capable of developing, testing, and deploying real-world production applications.
Completely refilmed for 3rd edition
Create Express web servers and APIs
Use cutting-edge ES6/ES7 JavaScript
Create real-time web apps with SocketIO
Build, test, and launch Node apps
Store data with Mongoose and MongoDB
Deploy your Node apps to production
When Learning, Learn The Latest.
I work to keep this course full of the most up-to-date Node material out there. This course is compatible with the latest Node.js version. You’re getting access to hot-off-the-press features. Everything you need comes in one easy-to-use package. You can stop worrying if you're learning the right skills to build an app or land a new job. I've curated all the tech that's essential to building real-world apps. I've mapped out everything in a comprehensive, easy-to-follow package designed to get you up and running in a few weeks. There’s no better time to learn Node. According to the 2016 Stack Overflow Survey, Node is in the top ten for back-end popularity and back-end salary, with an average salary of $85k. This means more jobs and more opportunities for you. You might get stuck. But I’m here to help. There’s nothing worse than getting five hours into a course, getting stuck, and not getting the help you need to continue. I’m in the Q&A everyday to help you get unstuck. I reply to every question to get you back on track.
0 notes
nosql-master · 7 years ago
Photo
Tumblr media
Building a Node.js Powered API with Express, Mongoose & MongoDB ☞ https://hackernoon.com/building-a-node-js-powered-api-with-express-mongoose-mongodb-19b14fd4b51e #MongoDB #Mongoose
1 note · View note
Text
Brief for project - Context outline
We began with an in person Hackspace hackathon with the intention of facilitating quick idea generation and project ideation. The first of two hackathons setup during the Hackspace module, this one with the intention of collaborative ideation. The brief was open and would allow us to explore multiple ideas in groups and ideate on these collaborative thoughts. This blog is an in-depth documentation of the process and the realisation of the project and all its components. 
The brief being so open meant that within our groups we would need to quickly run through a number of project ideas, looking at feasibility and our skillset. We ended up deciding that the context of the project was surrounding the generation of character connections for use in games and maybe with a future development for general storytelling. The project would aid in the creation of character wireframe, a web of connection with a number of assets, this ultimately being helpful adding depth to a game of Dungeons and Dragons for example.
Hackathon - Techniques
Though I have already mentioned the idea and the context it's embedded in, the idea only came to fruition through the hackathon. Only through the use of these techniques mentioned were we able to nail down the project and how it would address certain issues.
We started the Hackathon with a page dump, trying to note down as many areas or concepts as possible then we began to refine the assortment of concepts and help narrow down areas for focus. This technique was helpful in applying some restraints to the creative process, creating a small amount of pressure for the development of ideas. Through this method we were able to as a group nail down specific areas for theme development. These were Connections, Dreams, Parallel. We looked at a combination of all three when attempting to ideate through possible applications. 
Failed Ideas / progress
We found an initial idea that centred around an alarm application that would be able to track your sleep and then deliver a personalised wake-up routine to ease the transition from sleeping to awake.
Using these themes we were able to come up with this idea quickly, we spoke and attempted to develop it further having to complete a small presentation for the class in order to receive feedback and critique. We continued to look at possible technologies in order to achieve the application. We quickly found that the technical ability in the timeframe we had would not be feasible in combination with the feedback we had received from the group.
The Idea
After moving away from our initial idea we continued to think on an application with user benefits that would fit the technological and time constraints of this collaborative project. Joel pitched an idea for a character generator with the application to aid users in the quick creation of character connections for use in games such as Dungeons and Dragons where characters are heavily focused. We also spoke about future applications being for writers, generally aiding in creating webs of characters with relationship indicators.
In terms of reaching the foundations of this idea we looked at a number of methods outlined in the teaching during the Hackathon. Reverse brainstorming helps facilitate this idea heavily. Being able to identify a problem that many of us have faced, look at a possible solution and develop a real solution to said area. We found that attempting to come up with a large collection of characters quickly with a few attributes was difficult, only being able to figure out the central character. We found that using a bank of many attributes, names and relationship levels we could quickly create a character web for story based situations.
We were also able to apply a number of techniques from the Scamper Method, Adapting a similar concept of generators. Example: Name generators, idea generators. There seemed to be an endless amount of generator websites for all different areas. Using the Adapt concept we had changed the context of existing models, applying it to a more niche market and adjusting the tone for a more creative story orientated product. It could also be loosely applied to the Rearrange concept, having reordered the users journey giving them a platform to build from rather than shaping their characters whilst involved in a specific game or story situation. It hadn’t completely removed this aspect as the generator served as a baseline for users to work from and adapt, adopting as little of the generated information as they desired.
What followed and the development of the idea
Paper prototyping
Tumblr media Tumblr media
Initial meeting
We spoke about what kind of technologies we wanted to use when creating the product
We decided initially on an entirely web based stack, using html for the frontend with an RESTful API for the sending and receiving of data. It would also allow use to connect the entire application to a database for persistent storage
Began to paper prototype some interface designs, Nishesh was set the role of UI designer and began working on some high fidelity mockups to add in the frontend development that would be undertaken by Joel.
First Tasks
I had researched a number of technologies from our initial conversations regarding what stack to use, we had come to the conclusion that each of us brought certain skills and we should utilise them. In keeping with this, I had come to the conclusion that Node js, Express, Mongoose and Mongodb would be our key backend technologies.
I began researching possible implementations for Mongodb (The database) and the Node js server using express as a framework. I had only used Mongodb once before and after researching I found Mongoose a package that allowed me to customise schemas for sending and receiving data from the database
I then began creating the API, creating specific routes for specific data, this would create documents in the database that could be queried and updated.
Technical Design
Backend
GitHub Repo: https://github.com/blanghamm/hackspace-collab-api
MongoDB
Tumblr media
Document stucture for MongoDB, collections on the left hand side.
The backend structure was very important in dictating the frontend usage and also how we stored all the user information as well as the template names and attributes. We needed something that was flexible, this was the main factor in choosing MongoDB as the database. MongoDB is a NoSQL database, it relies on collections that contain documents rather than tables (SQL). Its lack of structure in comparison to SQL is what makes it very helpful for robust flexible data management.
Mongoose
Tumblr media
Schema for the structure of data inside of the database when moving through the server.
Mongoose was used as middleware when creating the server that connected to the database, it facilitated the creation of schemas. Schemas allow for a number of rules to be set up restricting the information parameters be it for incoming or outgoing data. For example the schema model for sending data is structured as below (Image) it shows the type of data it expects. This allows for the data we send and receive to be consistent throughout the API. This would help with interpreting the information later in the frontend application.
Express
Tumblr media
Main server file that contains all the routes for the API.
Express is a framework for Node js , it helps in easing the process when creating a server. Having a myriad of HTTP utility methods and middleware built in. It states on their website that ‘creating a robust API is quick and easy’. https://expressjs.com/ Having used it previous I found this statement to be pretty accurate. I was able to quickly create a server with a single entry point and then begin to attach various routes.
Hosting
Tumblr media
List of builds on Heroku allowing for access to the API with a URL.
It’s not very exciting but here’s the link for the API with the endpoint firsnames, which will return a JSON dataset with firstnames stored in the database. They are structured by the Mongoose schema pattern linked above. 
https://hackspace-api.herokuapp.com/firstnames
Once I had created the different endpoints depending on the data needed for the frontend I made it more accessible by hosting it on Heroku. A hosting platform specially designed for web applications. This meant it was accessible from anywhere with the correct URL. This meant when Joel began testing the frontend application he was able to access the data without having to download all of the necessary files.
Frontend
GitHub Repo: https://github.com/JoelRobinsonUK/ConnectionGenerator
Prototype
youtube
Here’s a link to the working protoype: https://joel-robinson.itch.io/character-relationship-generator
We initially decided on an entirely web based application, many of the team wanted to try out some new technologies. Once we had begun researching all of the necessary technologies we found that creating the frontend in purely HTML and JS would be quite difficult without a framework for live data manipulation. We therefore decided to use Unity for the frontend application as this was more familiar to the team. 
The combination of a Unity frontend and Node js backend proved to be a strong combination but there were a number of issues along the way. One main issue we had when attempting to retrieve the data from the API was how Unity interrupted JSON data which is what the server stored all its information in. Initially using the Unity plugin JSON Utility to decode the data we found that it was not able to process objects wrapped inside of a top level array. We therefore found another plugin that allowed use to decode the JSON data inside of Unity. JSON.net was that plugin that helped us with data transfer.
Tumblr media
The code needed for a web request, pointing at the heroku hosted URL.
We used a web request to retrieve all of the data from the API and also send data back when needed, it allowed us to manage the data separately and only request it when needed. This helped with removing a large dataset inside of Unity and meant updating information would be much easier due to its external nature.
Maximum degrees of separation
Degrees of separation decide the amount of single point connections that stem from the main character. Adding more degrees will create offshoots further away from the central character.
Not all smooth sailing
When speaking to Joel about any technical setbacks, he found that attempting to sort the degrees of separate had some odd outputs from the node rings that are pre-placed. When the user begins interacting it limits the amount of nodes that are shown depending on the degrees of separation, but this would cause some interesting connection lines between the nodes that wouldn’t strictly follow the users rules.
Visual Design
youtube
When planning the visual side of the application we found a quick way to move forward with the prototyping phase was to paper prototype a user interface. (Image) We wanted to have a central area with the connections clearly highlighted followed by a number of settings and modifiers surrounding it to allow for a constant reconfiguration. It would give the user the ability to regenerate a set of character relationships on the main dashboard without having to start the process from scratch.
Tumblr media Tumblr media
These two examples above are from the original high fidelity designs Nishesh created from the paper prototypes. The video above is the second iteration and closer to the desired design.
When moving forward with the UI designs, Nishesh began developing the initial version of high fidelity designs. He initially used Sketch to create the designs sharing them through Zeplin, which also included the css properties though they were no longer needed due to the change in frontend framework. The second refined designs were created using Adobe XD as they had some collaborative features that would be useful for future developments. I’ve included some screenshots of the UI itself (List Order) Also attached is a video with a run through of how to use the interface.
Here’s a link to all of the visuals used throughout the projects development:
https://drive.google.com/drive/folders/1fa5MCDmFke7bUY2hwkxnC577YSi0c410?usp=sharing
User Testing
“Overall I really like the product. It’s a good way to develop a story as what often delays the plotting process is coming up with the characters and deciding what their relationships to each other are. This tool offers prompts to help with that process.
Suggestions: An option of seeing “biggest fear” or “dreams” to have a better understanding of the characters.  
The option to change the type of relationship between two characters, and add/remove connections.”
We found through some quick user testing that the application fit the area we had intended to deploy it to, helping with the process of character relationships. With the feedback we received we were able to add a number of possibilities to the future development document, adding more customisation for users would be the next logical step. Made possible by the flexibility of our system architecture.
Critical Reflection
Development
The overall concept for the project fit nicely with the prototypes we created and used a number of key technologies that utilised skill sets within the team. It focused on a problem and adapted current applications such as name generators to create a unique character relationship generator for story based games. Also being able to test it on a number of participants helps us to diagnose areas that require more focus. 
The requirements for the project were met, we were able to create a number of visual prototypes that could showcase the UI and design aspects of the project. Moving from the paper prototypes and adapting them to fit the needs of the application. Using technology such as Node js allowed for the creation of a flexible and scalable platform that would facilitate future development of the project. This coupled with a Unity frontend that could be attached to the backend system helped with quick prototyping of a reactive product.
Being that we had used these two separate technologies also meant that for future development the project itself had become rather modular and therefore if we found weakness in certain technologies we could reconfigure the stack depending on the specific boundaries.
Roles & Collaboration
Being that the initial concept took a few sessions to iron out, it allowed us to fully understand each other's strengths and assign each role to the correct team member. I think this is apparent in the progress the project made and the wide range of technologies that contribute to the final prototype. Throughout the project we kept to our initial concept and made sure not to scope creep too heavily, any additional ideas were added to a future development document which Wiktor had been updating and assessing how that would benefit our project in the future. This had been vital in keeping on track with the concept and delivering a prototype as close to our original idea as possible. 
Possible areas for improvement were only due to the lack of knowledge in specific areas, it was marginally disappointing that when jumping between technologies we all lacked a slight understanding of each other's role and tech. There were of course areas that we could help one another but it would have been better as a team to be able to jump between all roles and offer as much assistance as possible. As much as this was a disappointment in terms of having more input to specific aspects, I feel the team was very effective in their area delivering some high quality prototypes, that in tandem with consistent communication throughout.
Personal contribution
There were moments during the project that certain aspects felt a little aimless in our goals but I feel that as a team we were able to address this issue with each of us pushing the others on certain aspects and putting us back on track. Throughout the project I felt as though I personally had to do this, scheduling meetings to share progress and make sure everyone was comfortable with their personal objectives. 
I enjoyed working on my specific technology and believe that it contributed heavily to the project and made sure it was scalable and easy to use for other team members. Throughout the project I felt that the leadership was mainly managed by Joel and he helped align the scope throughout but there were times when I would need to check in and monitor that everyone was happy and on course which worked well not putting too much pressure on one team member.
Future Developments
When looking at future developments for the project a number of ideas that we had taken during the development process had been added, as not to scope creep. Being able to save the character web for future reference and allow for the editing and saving of an updated character web. This would be easy to implement with the flexibility of the backend API, the overall structure of the database would allow users to save full webs and recall when needed. 
References
parentElement LLC (2017) JSON .NET For Unity (2.0.1). Available at: https://assetstore.unity.com/packages/tools/input-management/json-net-for-unity-11347 (Accessed: 20 October 2020).
Heroku., 2020a. Platform as a Service | Heroku [online]. Available from: https://www.heroku.com/platform [Accessed 6 Nov 2020].    
Mongoose., 2020b. Mongoose ODM v5.10.12 [online]. Available from: https://mongoosejs.com/ [Accessed 6 Nov 2020].    
MongoDB., 2020c. The most popular database for modern apps [online]. MongoDB. Available from: https://www.mongodb.com [Accessed 6 Nov 2020].
Express., 2020. Express - Node.js web application framework [online]. Available from: https://expressjs.com/ [Accessed 6 Nov 2020].  
0 notes
codingstatusdotcom · 5 years ago
Link
#nodejs
#expressjs
#webtechnology
#webdeveloper
#javascript
0 notes